import difflib

def readfile(filename):
    try:
        file = open(filename,'r',encoding='utf-8')
        text = file.read().splitlines()
        file.close()
        return text
    except IOError as e:
        print(e)

t1 = r"C:\Users\EDZ\Desktop\1.css"
t2 = r"C:\Users\EDZ\Desktop\2.css"

t1_lines = readfile(t1)
t2_lines = readfile(t2)

diff = difflib.HtmlDiff()
file = open("diffconf.html",'w',encoding='utf-8')
file.write(diff.make_file(t1_lines,t2_lines))
file.close()